﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Classes;
using FlightSystemDBLayer;


namespace FlightSystemControlLayer
{
    class SearcherCtr
    {
        IList<City> listOfCities;
        IList<Flight> listOfFlights;
        City cityFrom;
        City cityTo;
        int seatsNo;
        DateTime departureTime;
        DateTime arrivalTime;
        ICity dbCity;
        Searcher searcher;
        IFlight dbFlight;
        

        public SearcherCtr()
        {
            dbCity = new DBCity();
            listOfCities = dbCity.GetDBCities();
            dbFlight = new DBFlight(listOfCities);
            listOfFlights = dbFlight.GetFlights();

            searcher = new Searcher();
        }
        public void MakeASearch(string cityFromName, string cityToName)
        {


        }

    }
}

//foreach(City c in listOfCities)
//{
//    Console.WriteLine(c.Name);
//}
//foreach(Flight f in listOfFlights)
//{
//    Console.WriteLine(f.From.Name);
//}
    
         
        //    searcher.MakeAGraph(listOfCities, listOfFlights);
        //    IGraphImpl g = searcher.ReturnGraph();
        //     foreach(City c in g.GetAdjacencies(listOfCities[1]))
        //     {
        //         Console.WriteLine(c.Name);
        //     }
           

        //    searcher.MakeAGraph(listOfCities, listOfFlights);
        //    searcher.MakeASearchInGraph(listOfCities[0], listOfCities[1]);
        //}